<?php

require_once("./lib/pluginbase.php");

class VomitPlugin extends PluginBase
{
	function processChatCommand($name, $cmd, $args)
	{
		switch ($cmd)
		{
			case "!vomit":
 
				if (count($args) > 0 && $this->isAdmin($name))
				{
					$name = $args[0];
				}
				echo "say $name is feeling ill\n";
				for($i = 1; $i < 6; $i++)
				{
					usleep(100000);
					echo "give " . $name . " " . $i . "\n";
				}
				for($i = 12; $i < 20; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
				echo "give " . $name . " 35\n";
                                for($i = 37; $i < 45; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 268; $i < 275; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 280; $i < 288; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 290; $i < 292; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 294; $i < 301; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 318; $i < 324; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }
                                for($i = 330; $i < 341; $i++)
                                {
                                        usleep(100000);
                                        echo "give " . $name . " " . $i . "\n";
                                }






				break;
		}
	}
}

registerPlugin("vomit", new VomitPlugin);


